﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;


namespace com.yd.sdk.api
{
    public interface IAdListener
    {
        /// <summary>
        /// 广告加载成功事件
        /// </summary>
        event UnityAction<AdType> HandleAdSucessToLoad;
        /// <summary>
        /// 广告加载失败事件
        /// </summary>
        event UnityAction<AdType,string> HandleAdFailedToLoad;
        /// <summary>
        /// 广告打开事件
        /// </summary>
        event UnityAction<AdType> HandleAdOpened;
        /// <summary>
        /// 广告关闭事件
        /// </summary>
        event UnityAction<AdType,string> HandleAdClosed;
        
        /// <summary>
        /// 广告加载成功
        /// </summary>
        /// <param name="type">广告类型</param>
        void OnAdSucessToLoad(AdType type);
        
        /// <summary>
        /// 广告加载失败
        /// </summary>
        /// <param name="type">广告类型</param>
        /// <param name="message">失败消息</param>
        void OnAdFailedToLoad(AdType type,string message);

        /// <summary>
        /// 广告打开
        /// </summary>
        /// <param name="type"></param>
        void OnAdOpened(AdType type);
        
        /// <summary>
        /// 广告关闭
        /// </summary>
        /// <param name="type">广告类型</param>
        /// <param name="reward">是否获得额外奖励</param>
        void OnAdClosed(AdType type, string reward);
    }

}
